<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/pages/template/libs.jsp" %>

<script type="text/javascript" src="resources/js/articulo/buscar.js"></script>


<div style="width: 800px;">

	<form id="frmBuscar" onsubmit="javascript: doBuscar(); return false;" method="post">
		<div class="framelight" style="width: 500px">
			<div class="title"><img src="resources/img/icon/buscar.png" align="absmiddle" />&nbsp;<bean:message key="app.articulo.buscar.caption"/></div>
			<div class="form">
			
				<table class="form-list" cellpadding="4px" cellspacing="0px">
					<tr>
						<td><bean:message key="app.articulo.buscar.buscarpor"/></td>
						<td>
							<select name="searchBy">
								<option value="DE"><bean:message key="app.word.description"/></option>
						  	</select>
						</td>
					</tr>
					<tr>
						<td></td>
						<td><input type="text" value="" name="value" id="value"/></td>
					</tr>
				</table>
			
				<div class="buttons">
					<div class="button">
						<ex:button customClass="blue" onClick="doBuscar();" ><bean:message key="app.forms.button.find"/></ex:button>
					</div>
					<div class="button">
						<ex:button><bean:message key="app.forms.button.clear"/></ex:button>
					</div>
				</div>
			
			</div>
		</div>
	</form>
	
	<c:if test="${listArticulo!=null}">
		<div class="grid">
			<table cellspacing="0">
				<thead>
					<tr>
						<th>Codigo Articulo</th>
						<th>Codigo Rubro</th>
						<th>Descripcion</th>
						<th>Precio Venta</th>
						<th>Costo Unitario</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="articulo" items="${listArticulo}">
					<tr articuloId="<c:out value="${articulo.idarticulo}" />">
						<td width="80px">
						<ex:button color="white" align="center" onClick="selectedRow(this);"><c:out value="${articulo.idarticulo}" /></ex:button></td>
						<td><c:out value="${articulo.rubro.descrip}" /> </td>
						<td><c:out value="${articulo.descrip}" /> </td>
						<td align="right"><c:out value="${articulo.precio}" /> </td>
						<td align="right"> <i>No implementado</i></td>
					
					</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</c:if>
	<c:if test="${msg!=null}">
		<div class="grid" style="width: 800px;">
			<table cellspacing="0"  >
				<tbody>
					<tr>
						<td style="padding: 5px;"><i>
						
						<c:if test="${msg=='nofound'}">
							<bean:message key="app.word.nofound"/>
						</c:if>
						
						</i></td>
					</tr>
				</tbody>
			</table>
		</div>
	</c:if>

</div>
